package cn.pojo;

import java.util.Date;
import java.util.List;

/**
 * 会员类 ：注意set值顺序
 * 
 * @author Lenovo
 *
 */
public class Member implements Comparable<Member> {
	private String userName;// 用户名，6-12位，字母开头，非空，唯一
	private String passWord;// 密码，6-12位，字母开头，非空，
	private String telNum;// 移动电话号码，11位，唯一，非空
	private Date birthDay;// 生日，非空
	private Integer score;// 积分，非空，[1000,9999]
	private String cardNo;// 会员卡号，单字母开头，11位，唯一，非空
	private Date registDate;// 注册日期，非空
	private String gender;// 非空，[男，女]
	private String identityNo;// 身份证号，18位，非空，唯一
	private Integer age;// 年龄
	private String email;// 邮箱，非空，如：tom@126.com
	private Integer id;// 编号
	private List<Score> list;// 当前所有member的积分记录
	private Token token;

	public List<Score> getList() {
		return list;
	}

	public void setList(List<Score> list) {
		this.list = list;
	}

	public Token getToken() {
		return token;
	}

	public void setToken(Token token) {
		this.token = token;
	}

	@Override
	public int compareTo(Member o) {
		return 0;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassWord() {
		return passWord;
	}

	public void setPassWord(String passWord) {
		this.passWord = passWord;
	}

	public String getTelNum() {
		return telNum;
	}

	public void setTelNum(String telNum) {
		this.telNum = telNum;
	}

	public Date getBirthDay() {
		return birthDay;
	}

	public void setBirthDay(Date birthDay) {
		this.birthDay = birthDay;
	}

	public Integer getScore() {
		return score;
	}

	public void setScore(Integer score) {
		this.score = score;
	}

	public String getCardNo() {
		return cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	public Date getRegistDate() {
		return registDate;
	}

	public void setRegistDate(Date registDate) {
		this.registDate = registDate;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public String getIdentityNo() {
		return identityNo;
	}

	public void setIdentityNo(String identityNo) {
		this.identityNo = identityNo;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Member other = (Member) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Member [userName=" + userName + ", passWord=" + passWord + ", telNum=" + telNum + ", birthDay="
				+ birthDay + ", score=" + score + ", cardNo=" + cardNo + ", registDate=" + registDate + ", gender="
				+ gender + ", identityNo=" + identityNo + ", age=" + age + ", email=" + email + ", id=" + id + "]";
	}
}
